<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  	<meta charset="UTF-8">
	<title>CRM后台审核管理</title>
	<link rel="stylesheet" href="../css/bootstrap.min.css">
	<link rel="stylesheet" href="../css/docs.min.css">
	<script src="../js/jquery-1.11.1.js"></script>
	<script src="../js/bootstrap.min.js"></script>
	<style>
		body{margin:70px;};
		
	</style>
	
</head>

<body>
	<div class="container" style="width:1000px;margin:auto">
	 	<nav class="navbar navbar-default navbar-fixed-top" style="margin:auto;width:1000px">
		  <div class="container-fluid">
		    <!-- Brand and toggle get grouped for better mobile display -->
		    <div class="navbar-header">
		      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
		        <span class="sr-only">Toggle navigation</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </button>
		      <a class="navbar-brand" href="#"><b><span style="color:blue">诚信金融</span></b></a>
		    </div>
		
		    <!-- Collect the nav links, forms, and other content for toggling -->
		    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
		      <ul class="nav navbar-nav">
		        <li><a href="#">公司介绍</a></li>
		        <li class="dropdown">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">办理款项<span class="caret"></span></a>
		          <ul class="dropdown-menu">
		          	<li><a href="home.html">全部项目</a></li>
		            <li role="separator" class="divider"></li>
		            <li><a href="home.html">公司贷款</a></li>
		            <li><a href="home.html">个体户贷款</a></li>
		          </ul>
		        </li>
				<li class="dropdown">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">款项<span class="caret"></span></a>
		          <ul class="dropdown-menu">
		            <li><a href="user.html">全部款项</a></li>
		            <li role="separator" class="divider"></li>
		            <li><a href="home.html?a=1">待审核款项</a></li>
		            <li><a href="home.html?a=2">已通过款项</a></li>
		            <li><a href="home.html?a=3">未通过款项</a></li>
		          </ul>
		        </li>
		      </ul>
		      <form class="navbar-form navbar-left" role="search">
		        <div class="form-group">
		          <input type="text" class="form-control" placeholder="Search" />
		        </div>
		        <button type="submit" class="btn btn-default">搜索
					<span class="glyphicon glyphicon-search"></span>
				</button>
		      </form>
		      <ul class="nav navbar-nav navbar-right">
		        <li><a href="admininfo.html">user</a></li>
		        <li class="dropdown">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">选项<span class="caret"></span></a>
		          <ul class="dropdown-menu">
		            <li><a href="bg_log.html">更换帐号</a></li>
		            <li role="separator" class="divider"></li>
		            <li><a href="bg_log.html">退出登录</a></li>
		          </ul>
		        </li>
		      </ul>
		    </div><!-- /.navbar-collapse -->
		  </div><!-- /.container-fluid -->
		</nav>
	</div>
	<div class="container" style="width:1000px;margin:auto">
		<div class="row">
			<div class="col-xs-3">
				<div class="panel panel-default">
					<div class="panel-heading">
						<div class="panel-title">
							<h4 style="text-align:center;">操作</h4>
						</div>
					</div>
					<div class="panel-body">
						<div class="bs-docs-sidebar hidden-print hidden-xs hidden-sm">
							<ul class="nav bs-docs-sidenav" id="list">     
								
							</ul>
							<a class="back-to-top" href="#top">返回顶部</a>
						</div>
					</div>
				</div>
			</div>
			<div class="col-xs-9" id="body">
				
			</div>
		</div>
	</div>
	<script>
		$(function(){
			$.post('bg_list.php',function(list){
				for(var i = 0;i<list.length;i++){
						$('<li>',{html:$('<a>',{html:list[i].func,'id':'a'+list[i].id}),'id':'li'+list[i].id}).appendTo($('#list'));
						$('<ul>',{'id':'menus'+list[i].id,'class':'nav'}).css('display','none').appendTo($('#li'+list[i].id));
						$('#li'+list[i].id).click(function(){
							$('#list ul').css('display','none');
							$(this).children().css('display','block');
						})
						$.post('bg_menu.php',{cid:list[i].id},function(menu){
							
							for(var h = 0;;h++){
								try{
									$('<li>',{html:$('<a>',{text:menu[h].func,'href':'#'}).click(function(){
										var me = $(this).html();
										if(me == "待跟进客户"){
											$('#body').load("./To_follow_up.html");
										}
										if(me == "客户跟进记录"){
											$('#body').load('Customer_follow_up.html');
										}
										if(me == "销售人员跟进记录"){
											$('#body').load('Sales_follow_up.html');
										}
										if(me == "客户划分"){
											$('#body').load('Divide_customer.html');
										}
										if(me == "成交量"){
											$('#body').load('deal.html');
										}
										if(me == "员工列表"){
											$('#body').load('Staff_list.html');
										}
										if(me == "任命"){
											$('#body').load('Appoint.html');
										}
										if(me == "卸任"){
											$('#body').load('Outgoing.html');
										}
										if(me == "创建部门"){
											$('#body').load('Established_division.html');
										}
										if(me == "划分销售"){
											$('#body').load('./Divide_sales.html');
										}
										if(me == "划分主管"){
											$('#body').load('Divide_director.html');
										}
										if(me == "撤销部门"){
											$('#body').load('Repeal_division.html');
										}
										if(me == "客户池"){
											$('#body').load('Pool.html');
										}
										if(me == "我的客户"){
											$('#body').load('myPool.html');
											console.log(this);
										}
									})}).appendTo($('#menus'+menu[h].id));
								}catch(e){
									break;
								}
							}
							
								
						},"json")
					}
					$('#li4>ul').remove();
				
			},"json");
			
		});
	</script>
</body>
</html>